<script setup name="View">
import { ref,watch } from 'vue';

let steps = ref(0)

const updateRoad=()=>{
    steps.value +=10;
}

watch(steps,(newValue,oldValue) =>{
    console.log("View 中监听到 steps: ", newValue)
})


</script>

<template>
    <div>
        <button @click="updateRoad">行走10步</button>
    </div>

</template>

<style scoped>
    
</style>